home *** CD-ROM | disk | FTP | other *** search
/ Best of Shareware / Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso / mac / ZIPPED / DOS / TELECOMM / TM_301.ZIP / TLXMOVE.NTS < prev    next >
Text File  |  1992-10-09  |  4KB  |  76 lines

  1.                           Notes from the programmer...
  2.  
  3.           TLXMOVE v3.00 was programmed in TURBO PASCAL v6.0 to take 
  4.      advantage of the new in-line assembler commands.  It does *NOT* use 
  5.      any of Turbo-Vision that, while it looks good, looks extremely 
  6.      complicated to use and set up and adds a lot of size to your .EXEs 
  7.      (the HELLO WORLD program which does one pull down menu of three 
  8.      options and a push-button box with 5 push-buttons compiles to almost 
  9.      50k!).  I'd hate to see the size a program that could actually DO 
  10.      something might get to!  
  11.           Also, I like something I can customize (like appearance) without 
  12.      having to pay an extra grand or so for source code.  Unfortunately, 
  13.      most of TV is compiled .TPU files which leaves little room for 
  14.      customization.
  15.           All routines in this program were written from scratch by me 
  16.      (mostly in TP v5.5 BEFORE 6.0 ever came out). 
  17.  
  18.           This is not to brag, but get all those people out there who look 
  19.      at it and say: 'Hey!  He's cheating!' off my back.
  20.  
  21.           I really don't like writing 'shell' code (code that all it seems 
  22.      to do is run other peoples routines).  It's not much fun to write a 
  23.      program like:
  24.  
  25.           BEGIN PROGRAM
  26.                READ TELIX PHONE DIRECTORY
  27.                DISPLAY PHONE LIST ON SCREEN
  28.                PUT UP SOME FANCY BUTTONS
  29.                MOVE RECORDS USING MOUSE
  30.                IF USER WANTS TO SAVE THEN SAVE AND EXIT
  31.                IF USER WANTS TO EXIT THEN EXIT
  32.                OTHERWISE GO BACK TO MOVING RECORDS
  33.           END PROGRAM
  34.  
  35.      I mean, where's the challenge in that?  I would rather write the 
  36.      routines that read the phone directory, display the list, move the 
  37.      records, etc.  I get a better sense of accomplishment when I create 
  38.      something that is all mine.
  39.  
  40.           If you like Turbo Vision, hey!  More power to you.  It's for some 
  41.      people but not for others.  I don't want to start any arguments about 
  42.      whether it's great or not, because it probably is for some people.  
  43.      Just, not for me.   (Now watch me learn how to use it and start saying 
  44.      otherwise!) 
  45.  
  46.           I do like that in-line assembler in TP 6.0, though. It helps you 
  47.      to write routines like:
  48.  
  49.      (**********************************************************************)
  50.      (* Function ...... Replicate()
  51.      (* Purpose ....... To create a string filled with a certain character.
  52.      (* Parameters .... cChar      Character to replicate
  53.      (*                 nCount     Number of times to replicate cChar
  54.      (* Returns ....... A string <nCount> in length filled with the character
  55.      (*                 <cChar>.
  56.      (* Notes ......... None
  57.      (* Author ........ Martin Richardson
  58.      (**********************************************************************)
  59.      FUNCTION Replicate( cChar: CHAR; nCount: BYTE ): STRING; ASSEMBLER;
  60.      ASM
  61.           XOR    CX, CX                  { Zero out CX }
  62.           MOV    AL, cChar               { Load character into AL }
  63.           MOV    CL, nCount              { Load count into CX }
  64.           LES    DI, @Result             { Point ES:DI to TP result pointer }
  65.           MOV    BYTE PTR ES:[DI], CL    { Move the length into result }
  66.           INC    DI                      { Point DI to true start of result }
  67.           CLD                            { We want to go forwards }
  68.           REP    STOSB                   { Copy AL, CX times into result }
  69.      END { Replicate };
  70.  
  71.      which you can step through with the Integrated Debugger.  This is a 
  72.      LOT easier than programming .ASM files which work with TP.
  73.      
  74.           Well, gotta run.
  75.      
  76.